<h1>Crear cuenta</h1>

<%= form_for @user do |f| %>
  <% if @user.errors.any? %>
    <div class="error_messages">
      <h2>Formulario invalido</h2>
      <ul>
        <% for message in @user.errors.full_messages %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <p>
    <%= f.label :email,"Correo Electrónico" %><br />
    <%= f.text_field :email %>
  </p>
  <p>
    <%= f.label :rut %><br />
    <%= f.text_field :rut %>
  </p>
  <p>
    <%= f.label :nickname,"Alias" %><br />
    <%= f.text_field :nickname %>
  </p>
  <p>
    <%= f.label :password,"Contraseña" %><br />
    <%= f.password_field :password %>
  </p>
  <p>
    <%= f.label :password_confirmation,"Confirmar contraseña" %><br />
    <%= f.password_field :password_confirmation %>
  </p>
  <p class="button"><%= f.submit "Enviar"%></p>
<% end %>